package com.erlinyou.im.service.chat.impl;

import java.util.List;
import java.util.Optional;

import javax.annotation.Resource;

import org.springframework.data.domain.Example;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service;

import com.erlinyou.base.service.BaseServiceImpl;
import com.erlinyou.im.dao.repository.chat.ChatMessageDelRepository;
import com.erlinyou.im.model.chat.ChatMessageDel;
import com.erlinyou.im.service.chat.IChatMessageDelService;
@Service
public class ChatMessageDelServiceImpl extends BaseServiceImpl<ChatMessageDel, Integer> implements IChatMessageDelService {

	private ChatMessageDelRepository repository;
	@Resource
	public void setBaseService(ChatMessageDelRepository repository) {
		this.repository = repository;
		this.baseRepository = repository;
	}
	
	@Override
	public List<ChatMessageDel> findAll() {
		return repository.findAll();
	}

	@Override
	public List<ChatMessageDel> findAll(Sort sort) {
		return repository.findAll(sort);
	}

	@Override
	public List<ChatMessageDel> findAllById(Iterable<Integer> ids) {
		return repository.findAllById(ids);
	}

	@Override
	public <S extends ChatMessageDel> List<S> saveAll(Iterable<S> entities) {
		return repository.saveAll(entities);
	}

	@Override
	public void flush() {
		repository.flush();
	}

	@Override
	public <S extends ChatMessageDel> S saveAndFlush(S entity) {
		return repository.saveAndFlush(entity);
	}

	@Override
	public void deleteInBatch(Iterable<ChatMessageDel> entities) {
		repository.deleteInBatch(entities);
	}

	@Override
	public void deleteAllInBatch() {
		repository.deleteAllInBatch();
	}

	@Override
	public ChatMessageDel getOne(Integer id) {
		return repository.getOne(id);
	}

	@Override
	public <S extends ChatMessageDel> List<S> findAll(Example<S> example) {
		return repository.findAll(example);
	}

	@Override
	public <S extends ChatMessageDel> List<S> findAll(Example<S> example, Sort sort) {
		return repository.findAll(example, sort);
	}

	@Override
	public Page<ChatMessageDel> findAll(Pageable pageable) {
		return repository.findAll(pageable);
	}

	@Override
	public <S extends ChatMessageDel> S save(S entity) {
		return repository.save(entity);
	}

	@Override
	public Optional<ChatMessageDel> findById(Integer id) {
		return repository.findById(id);
	}

	@Override
	public boolean existsById(Integer id) {
		return repository.existsById(id);
	}

	@Override
	public long count() {
		return repository.count();
	}

	@Override
	public void deleteById(Integer id) {
		repository.deleteById(id);
	}

	@Override
	public void delete(ChatMessageDel entity) {
		repository.delete(entity);
	}

	@Override
	public void deleteAll(Iterable<? extends ChatMessageDel> entities) {
		repository.deleteAll(entities);
	}

	@Override
	public void deleteAll() {
		repository.deleteAll();
	}

	@Override
	public <S extends ChatMessageDel> Optional<S> findOne(Example<S> example) {
		return repository.findOne(example);
	}

	@Override
	public <S extends ChatMessageDel> Page<S> findAll(Example<S> example, Pageable pageable) {
		return repository.findAll(example, pageable);
	}

	@Override
	public <S extends ChatMessageDel> long count(Example<S> example) {
		return repository.count(example);
	}

	@Override
	public <S extends ChatMessageDel> boolean exists(Example<S> example) {
		return repository.exists(example);
	}




}
